#ifndef _CANIMATEDOBJECT_H
#define _CANIMATEDOBJECT_H

#include "CObject.h"
#include "CSprite.h"

class CAnimatedObject : public CObject
{
public:
	//--------------------------------------------//
	//	Constructor and Destructor for this class //
	//--------------------------------------------//
	CAnimatedObject();
	CAnimatedObject( float Xpos , float Ypos , float deep , float XVelocity , float YVelocity , int width , int height );
	virtual ~CAnimatedObject();

	//--------------------------------//
	//	Public methods for this class //
	//--------------------------------//
	void		LoadSprite				( CTexture* image , int NumFrame , int NumFrameInRow );

	void		SetVelocity				( float NewXVelocity , float NewYVelocity );
	void		SetXvelocity			( float NewXVelocity );
	void		SetYvelocity			( float NewYVelocity );
	void		SetGravity				( float NewGravity );
	void		CreateBoundBox			( float offsetX , float offsetY , int width , int height );
	void		MoveBoundBox			( float offsetX , float offsetY );
	

	float		GetXVelocity			( );
	float		GetYVelocity			( );
	float		GetGravity				( );


	//----------------------------------//
	//	Virtual methods from base class //
	//----------------------------------//
	void		Update					( float deltaTime );
	void		Render					( float camPosX = 0 , float camPosY = 0 );
	RECT		GetBoundBox				( );

	CSprite*	GetSprite				( ) const;
private:
	//-----------------------------------//
	//	Private variables for this class //
	//-----------------------------------//
	CSprite			*m_pSprite;

	float			 m_XVelocity;
	float			 m_YVelocity;
	float			 m_fGravity;

protected:
	//-------------------------------------//
	//	Protected variables for this class //
	//-------------------------------------//
	float			 m_fOffsetX;
	float			 m_fOffsetY;
	int				 m_nOffsetWidth;
	int				 m_nOffsetHeight;
	
};

#endif